﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AdministrarEtapa.aspx.cs" Inherits="abmObra_AdministrarEtapa" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Administrar Etapas</title>
    <link rel="stylesheet" type="text/css" href="../estilos/estilos.css" />
    <link rel="stylesheet" href="../estilos/themes/base/jquery.ui.all.css" type="text/css"/>
    <script src="../js/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script src="../js/jquery-ui-1.8.21.custom.min.js" type="text/javascript"></script>
    <script src="../js/jquery.ui.datepicker-es.js" type="text/javascript"></script>

     <link rel="stylesheet" type="text/css" href="../estilos/demos.css" />
	
    <script type="text/javascript" >
        $(document).ready(function () {

            $("#etapas").hide();

            $('#verEtapas').click(function () {
                if ($('#etapas').is(':visible')) {
                    $('#etapas').hide();
                } else {
                    $('#etapas').show();
                }
            });


          $.datepicker.setDefaults($.datepicker.regional["es"]);

            $("[id$=txtFechaFin]").datepicker({
            });

            $("[id$=txtFechaInicio]").datepicker({
            });

        });
    </script>
    <style type="text/css">
        .input130px
        {}
        .style10
        {
        }
        .style12
        {
            height: 13px;
        }
        .style14
        {
            font-family: Arial;
            font-size: 11px;
            font-weight: normal;
            text-decoration: none;
            color: #FFFFFF;
            background-color: #426899;
            padding: 1px;
            text-align: center;
            height: 15px;
        }
        #Button1
        {
            width: 116px;
        }
        </style>
</head>
<body id="main_body" style="margin-left: 0px; margin-top: 5px; margin-right: 0px;
    margin-bottom: 0px; background-color: white;">
    <table align="center" border="0" cellpadding="0" cellspacing="0" width="760">
        <tbody>
            <tr>
                <td>
                    <div id="div_header" style="height: 70px;" class="title">
                        <table border="0" cellpadding="0" cellspacing="0" class="imagen_header">
                            <tbody>
                                <tr class="row_top">
                                    <td>
                                        <div style="width: 200">
                                        </div>
                                    </td>
                                    <td>
                                    </td>
                                     <td style="text-align: right" >
                                        <div class="loginName">
                                        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>&nbsp;&nbsp;
                                        <a href="../Salir.aspx"><img alt="" src="../images/salir.gif" border="0"  />&nbsp;Salir</a>&nbsp;&nbsp;
                                       
                                         |
                                        <a href="../CambiarClave.aspx">&nbsp;Cambiar Clave</a>&nbsp;&nbsp;
                                        
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                        </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div id="div_body" style="border-style: none; border-color: inherit; border-width: 0px; position: relative; left: 0px; top: -25px; align: center;
                        width: 760px; height: 474px; overflow-y: auto; overflow-x: hidden;
                        z-index: 20">
                        <form id="form2" runat="server">
                                    
                                            <table style="width: 100%; height: 343px; margin-right: 0px;" 
                                                    align="center">
                                                     <tr>
                                            <td class="text">
                                                Obras &gt;&gt; Administrar etapas</td>
                                        </tr>
                                                     <tr>
                                            <td style="height: 10px; text-align: center;" class="table_header_text_center">
                                                Administracion de etapas</td>
                                        </tr>
                                        <tr>
                                            <td class="text">
                                                Nro. OT
                                                <asp:TextBox ID="txtOT" runat="server" CssClass="input100px"  
                                                    ValidationGroup="buttonBuscar" Width="84px"></asp:TextBox>
&nbsp;<asp:Button ID="botonBuscarOT" runat="server" Text="Buscar" 
                                                    CssClass="small_button" OnClick="botonBuscarOT_Click"  ValidationGroup="buttonBuscar" />
                                                  &nbsp;<asp:RequiredFieldValidator ID="RequiredBuscar" runat="server" ControlToValidate="txtOT"
                                                   ValidationGroup="buttonBuscar" ErrorMessage="Debe especificar un numero de OT.">*</asp:RequiredFieldValidator>&nbsp;<asp:Label 
                                                    ID="mensajeEtapasCompletas" runat="server" CssClass="errorMessage" Text="Label" 
                                                                                Visible="False" Font-Bold="True" 
                                                    Font-Size="Small"></asp:Label>
                                                </td></td>

                                        </tr>
                                        <tr>
                                            <td class="text">
                                                Estado
                                                <asp:TextBox ID="txtEstado" runat="server" CssClass="input100px" 
                                                    ReadOnly="True" Enabled="False"></asp:TextBox>
                                            &nbsp;Fecha Inicio
                                                <asp:TextBox ID="txtFechaInicioOT" runat="server" CssClass="input100px" 
                                                    ReadOnly="True" Enabled="False"></asp:TextBox>
                                            &nbsp;
                                                <input id="verEtapas" type="button" value="Ver etapas"  class="large_button" />
                                                <div id="etapas">
                                                    <asp:Label ID="mensajeEtapas" runat="server" 
                                                        CssClass="errorMessage" Text="No hay estapas que mostrar" Font-Bold="True"></asp:Label>
                                                    <br />
                                                <asp:GridView ID="grdEtapas" runat="server" AllowPaging="True" 
                                                    AllowSorting="false" AutoGenerateColumns="False" BackColor="White" 
                                                    BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
                                                    EnableModelValidation="True" PageSize="7" Width="745px"  
                                                    Height="161px">
                                                    <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
                                                    <Columns>
                                                        <asp:BoundField DataField="nroEtapa" HeaderText="Etapa" SortExpression="nroPresupuesto" />
                                                        <asp:BoundField DataField="fechaInicio" HeaderText="Fecha Inicio" 
                                                            SortExpression="fechaInicio" />
                                                        <asp:BoundField DataField="fechaFin" HeaderText="Fecha Fin" 
                                                            SortExpression="fechaFin" />
                                                        <asp:BoundField DataField="diasTot" HeaderText="Dias Estimados" 
                                                            SortExpression="diasTot" />
                                                    </Columns>
                                                    <RowStyle BackColor="White" ForeColor="#003399" HorizontalAlign="Center" />
                                                    <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
                                                    <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
                                                    <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
                                                </asp:GridView>
                                                </div>
                                                </td>
                                        </tr>
                                        <tr>
                                           <td class="style14">
                                                Etapa</td>
                                        </tr>
                                        <tr>
                                            <td class="style10">
                                                <span class="text">Etapa</span>
                                                <asp:DropDownList 
                                                    ID="lstEtapa" runat="server" Height="16px" Width="218px" 
                                                    CssClass="input190px">
                                                </asp:DropDownList>
                                            &nbsp;<span class="text">Fecha inicio</span>
                                                <asp:TextBox ID="txtFechaInicio" runat="server" CssClass="input100px"  
                                                    ValidationGroup="groupAceptar" Width="112px"></asp:TextBox>
&nbsp;<asp:RequiredFieldValidator ID="ValidatorNombre" runat="server" 
                                                   ControlToValidate="txtFechaInicio"
                                                   ValidationGroup="groupAceptar" 
                                                   ErrorMessage="El campo: 'Fecha inicio' es obligatorio">*</asp:RequiredFieldValidator>


                                                <asp:RegularExpressionValidator ID="RegularFechaInicio" runat="server" ControlToValidate="txtFechaInicio"
                                                  ValidationGroup="groupAceptar"  ErrorMessage="Campo 'Fecha inicio': Sólo se permiten fechas con formato dd/mm/YYYY" ValidationExpression="(0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[012])/[0-9]{4}">*</asp:RegularExpressionValidator>


&nbsp;<span class="text">Ficha fin</span> 

                                             
                                                
                                                <asp:TextBox ID="txtFechaFin" runat="server" CssClass="input100px demo"  
                                                    ValidationGroup="groupAceptar" Width="112px"></asp:TextBox>
                                            
                                            &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                                   ControlToValidate="txtFechaFin"
                                                   ValidationGroup="groupAceptar" 
                                                   ErrorMessage="El campo: 'Fecha fin' es obligatorio">*</asp:RequiredFieldValidator>
                                                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtFechaFin"
                                                  ValidationGroup="groupAceptar"  ErrorMessage="Sólo se permiten fechas con formato dd/mm/YYYY" ValidationExpression="(0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[012])/[0-9]{4}">*</asp:RegularExpressionValidator>
                                                <br />
                                                <asp:Label ID="mensajeErrorFechas" runat="server" CssClass="errorMessage" Text="Label" 
                                                                                Visible="False" Font-Bold="True" 
                                                    Font-Size="X-Small"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style14">
                                                Obreros</td>
                                        </tr>
                                        <tr>
                                            <td class="style10">
                                                <span class="text">Figuración</span>
                                                <asp:DropDownList 
                                                    ID="lstObrero" runat="server" Height="22px" Width="395px" 
                                                    CssClass="input190px">
                                                </asp:DropDownList>
                                                &nbsp;&nbsp;
&nbsp;<asp:Button ID="botonAgregarObrero" runat="server" Text="Agregar" 
                                                    CssClass="small_button" OnClick="botonAgregarObrero_Click" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style12">
                                                                <asp:ListBox ID="obrerosAgreg" runat="server" CssClass="combo_filter_355" 
                                                                    Width="556px" SelectionMode="Multiple"  ValidationGroup="groupAceptar"></asp:ListBox>
                                                                    &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                                   ControlToValidate="obrerosAgreg" InitialValue="1"
                                                   ValidationGroup="groupAceptar" 
                                                   ErrorMessage="El campo: 'Obreros' es obligatorio">*</asp:RequiredFieldValidator>
                                                                <br />
                                                <asp:Button ID="botonQuitarObrero" runat="server" Text="Quitar" 
                                                    CssClass="small_button" OnClick="botonQuitarObrero_Click" />
                                            &nbsp;<asp:Label ID="mensajeErrorObrero" runat="server" CssClass="errorMessage" Text="Label" 
                                                                                Visible="False" Font-Bold="True" Font-Size="X-Small"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="height: 10px; text-align: center;" class="table_header_text_center">
                                                Asignacion de herramientas</td>
                                        </tr>
                                        <tr>
                                            <td class="style10">
                                                <span class="text">Herramientas</span>
                                                <asp:DropDownList 
                                                    ID="lstHerramientas" runat="server" Height="16px" Width="237px" 
                                                    CssClass="input190px">
                                                </asp:DropDownList>
                                                &nbsp; <span class="text">Cantidad</span>
                                                <asp:TextBox ID="txtCantidad" runat="server" CssClass="input100px" Width="80px">1</asp:TextBox>
                                                    &nbsp;<asp:Button ID="botonAgregarHerramienta" runat="server" Text="Agregar"  
                                                    CssClass="small_button" OnClick="botonAgregarHerramienta_Click" />
                                                <br />
                                                                <asp:ListBox ID="herramientasAgreg" runat="server" CssClass="combo_filter_355" 
                                                                    Width="556px" SelectionMode="Multiple"  ValidationGroup="groupAceptar"></asp:ListBox>

                                                                    &nbsp;<asp:RequiredFieldValidator 
                                                    ID="RequiredFieldValidator3" runat="server" 
                                                   ControlToValidate="obrerosAgreg" InitialValue="1"
                                                   ValidationGroup="groupAceptar" 
                                                   ErrorMessage="El campo: 'Herramientas' es obligatorio">*</asp:RequiredFieldValidator>
                                                <br />
                                                <asp:Button ID="botonQuitarHerramienta" runat="server" Text="Quitar" 
                                                    CssClass="small_button" OnClick="botonQuitarHerramienta_Click" />
                                            &nbsp;<asp:Label ID="mensajeErrorHerram" runat="server" CssClass="errorMessage" Text="Label" 
                                                                                Visible="False" Font-Bold="True" 
                                                    Font-Size="X-Small"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="height: 10px">
                                            <hr />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td >

                                             <div style="text-align: right;position:relative;z-index:-5;left:0px;top:0px;"> </div>
                                             
                                                <div style="text-align: left;position:relative;z-index:100;top:0px;"> <asp:Button ID="botonCancelar" runat="server" Text="Cancelar" CssClass="small_button" OnClick="botonCancelar_Click" />      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      <asp:Button ID="botonAceptar" runat="server" Text="Aceptar"  CssClass="small_button" OnClick="botonAceptar_Click" ValidationGroup="groupAceptar" />      </div>
                     

                                            
                                               
                                              
                                               
                                          
                                                
                                            
                                            </td>
                                        </tr>



                                         <tr>
                                            <td class="text">
                                  
                                                <asp:ValidationSummary ID="ValidationSummary1" ValidationGroup="groupAceptar" 
                                                    runat="server"  HeaderText="Los siguientes campos son erróneos o se encuentran vacíos:"
                                                    Height="16px" />
                                                
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="text">
                                  
                                                 <asp:ValidationSummary ID="ValidationSummary2" ValidationGroup="buttonBuscar" 
                                                    runat="server" HeaderText="Atención:"
                                                    Height="72px" />    
                                                    
                                            </td>
                                        </tr>

                                        </table>
                                   
                        </form>
                    </div>
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
                        <table id="centrar" align="center" cellpadding="0" 
        cellspacing="0" style="text-align: left;
                            text-indent: 2px; height: 0px;" 
        class="text">
                            <tr>
                                <td>
                                    
                        <table align="center" border="0" cellpadding="0" cellspacing="0" width="760" style="height: 0px">
                            <tbody>
            <tr>
                <td>
                    <table cellpadding="0" cellspacing="0" width="760px" style="background-color: white;
                        text-align: center; height: 0px;">
                        <tbody>
                            <tr>
                                <td>
                                    <img src="../images/footer2.gif" height="26" />
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
        </tbody>
    </table>
                                </td>
                            </tr>
                        </table>
                        </body>
</html>




